#include "map_test.h"
int main(int argc, char **argv)
{
  fprintf(stderr, "TEST: " __FILE__ " start\n");
  js_hashmap_t *map = js_hashmap_new(131);
  TEST(0, js_hashmap_size(map));
  js_hashmap_set(map, "hello", (void*)0xdeadbeaf);
  TEST(1, js_hashmap_size(map));
  /* update value */
  TEST((intptr_t)0xdeadbeaf, (intptr_t)js_hashmap_get(map, "hello"));
  js_hashmap_set(map, "hello", (void*)0xcafebabe);
  TEST(1, js_hashmap_size(map));
  /* add another value */
  TEST((intptr_t)0xcafebabe, (intptr_t)js_hashmap_get(map, "hello"));
  js_hashmap_set(map, "world", (void*)0x1234567);
  TEST(2, js_hashmap_size(map));
  js_hashmap_delete(map);
  fprintf(stderr, "TEST: " __FILE__ " end\n");
  return 0;
}
